import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Test from '@/components/Test'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/VehicleCenter', /* 测评中心（爱车，服务） */
      name: 'VehicleCenter',
      component: () => import('@/components/VehicleCenter.vue')
    },
    {
      path: '/FuzzySearch', /* 从搜索框 模糊搜索 */
      name: 'FuzzySearch',
      component: () => import('@/components/FuzzySearch.vue')
    },
    {
      path: '/TransactionHistory', /* 成交历史 */
      name: 'TransactionHistory',
      component: () => import('@/components/TransactionHistory.vue')
    },
    {
      path: '/ProduceList', /* 产品列表 */
      name: 'ProduceList',
      component: () => import('@/components/ProduceList.vue')
    },
    {
      path: '/ProduceDetail', /* 产品详情 */
      name: 'ProduceDetail',
      component: () => import('@/components/ProduceDetail.vue')
    },
    {
      path: '/Ueditor', /* 百度编辑器 */
      name: 'Ueditor',
      component: () => import('@/components/Ueditor.vue')
    },
    {
      path: '/UploadAssessmentCar', /* 上传测评（爱车，服务） */
      name: 'UploadAssessmentCar',
      component: () => import('@/components/UploadAssessmentCar.vue')
    },
    {
      path: '/Revehicle',
      name: 'Revehicle',
      component: () => import('@/components/Revehicle.vue'),
      children: [
        {
          path: 'AnswerList', /* 问答列表 */
          name: 'AnswerList',
          component: () => import('@/components/revehicles/AnswerList.vue')
        },
        {
          path: 'ServiceCase', /* 服务列表 */
          name: 'ServiceCase',
          component: () => import('@/components/revehicles/ServiceCase.vue')
        },
        {
          path: 'AssessmentDetail', /* 爱车测评详情 */
          name: 'AssessmentDetail',
          component: () => import('@/components/revehicles/AssessmentDetail.vue')
        },
        {
          path: 'ServiceDetail',  /* 服务详情 */
          name: 'ServiceDetail',
          component: () => import('@/components/revehicles/ServiceDetail.vue')
        }
      ]
    },
    {
      path: '/Test',
      name: 'Test',
      component: Test
    },
    {
      path: '/CarCompare',
      name: 'CarCompare',
      component: () => import('@/components/CarCompare.vue')
    },
    {
      path: '/Personal',
      name: 'Personal',
      component: () => import('@/components/Personal.vue'),
      children: [
        {
          path: 'PersonalInfo',
          name: 'PersonalInfo',
          component: () => import('@/components/personals/PersonalInfo.vue')
        },
        {
          path: 'PersonalPost',
          name: 'PersonalPost',
          component: () => import('@/components/personals/PersonalPost.vue')
        },
        {
          path: 'PersonalMyComment',
          name: 'PersonalMyComment',
          component: () => import('@/components/personals/PersonalMyComment.vue')
        },
        {
          path: 'PersonalSystemNews',
          name: 'PersonalSystemNews',
          component: () => import('@/components/personals/PersonalSystemNews.vue')
        },
        {
          path: 'PersonalComplaints',
          name: 'PersonalComplaints',
          component: () => import('@/components/personals/PersonalComplaints.vue')
        },
        {
          path: 'PersonalOpinion',
          name: 'PersonalOpinion',
          component: () => import('@/components/personals/PersonalOpinion.vue')
        },
        {
          path: 'PersonalCllection',
          name: 'PersonalCllection',
          component: () => import('@/components/personals/PersonalCllection.vue')
        },
        {
          path: 'PersonalChangePass',
          name: 'PersonalChangePass',
          component: () => import('@/components/personals/PersonalChangePass.vue')
        },
        {
          path: 'PersonalEditor',
          name: 'PersonalEditor',
          component: () => import('@/components/personals/PersonalEditor.vue')
        }
      ]
    },
    {
      path: '/Login',
      name: 'Login',
      component: () => import('@/components/Login.vue'),
      children: [
        {
          path: 'LoginByPass',
          name: 'LoginByPass',
          component: () => import('@/components/logins/LoginByPass.vue')
        },
        {
          path: 'LoginByCode',
          name: 'LoginByCode',
          component: () => import('@/components/logins/LoginByCode.vue')
        },
        {
          path: 'LoginForgetPass',
          name: 'LoginForgetPass',
          component: () => import('@/components/logins/LoginForgetPass.vue')
        },
        {
          path: 'LoginReg',
          name: 'LoginReg',
          component: () => import('@/components/logins/LoginReg.vue')
        },
        {
          path: 'LoginBind',
          name: 'LoginBind',
          component: () => import('@/components/logins/LoginBind.vue')
        }
      ]
    },
    {
      path: '/Forums',
      name: 'Forums',
      component: () => import('@/components/Forums.vue'),
      children: [
        {
          path: 'Area',
          name: 'Area',
          component: () => import('@/components/forums/Area.vue')
        },
        {
          path: 'CarsClub',
          name: 'CarsClub',
          component: () => import('@/components/forums/CarsClub.vue')
        },
        {
          path: 'Theme',
          name: 'Theme',
          component: () => import('@/components/forums/Theme.vue')
        },
        {
          path: 'release',
          name: 'release',
          component: () => import('@/components/forums/release.vue')
        },
        {
          path: 'Brand',
          name: 'Brand',
          component: () => import('@/components/forums/Brand.vue')
        },
        {
          path: 'postDetail',
          name: 'postDetail',
          component: () => import('@/components/forums/postDetail.vue')
        }
      ]
    }
  ]
})
